<?php

/**
 * Termina a sessão atual
 */
function doLogout() {
    include "Redirect.php";

    session_start();
    session_destroy();

    redirect("index.php");
    exit;
}

if (isset($_GET['action']))
    if ($_GET['action'] == 'logout') {
        doLogout();
    }
?>
